TIME_V_TERMINAL

Overview

Calculate time for a particle in Stokes regime to reach terminal velocity.

Excel Usage

=TIME_V_TERMINAL(D, rhop, rho, mu, V_zero)
  • D (float, required): Diameter of the sphere [m]
  • rhop (float, required): Particle density [kg/m^3]
  • rho (float, required): Density of the surrounding fluid [kg/m^3]
  • mu (float, required): Viscosity of the surrounding fluid [Pa*s]
  • V_zero (float, required): Initial velocity of the particle [m/s]

Returns (float): Time for particle to reach terminal velocity [s], or error message (str) if invalid.

Examples

Example 1: Tiny particle starting fast

Inputs:

D rhop rho mu V_zero
1e-7 2200 1.2 0.0000178 1

Excel formula:

=TIME_V_TERMINAL(1e-7, 2200, 1.2, 0.0000178, 1)

Expected output:

Result
0

Example 2: Small particle reaching terminal velocity

Inputs:

D rhop rho mu V_zero
0.00001 2200 1.2 0.0000178 0.1

Excel formula:

=TIME_V_TERMINAL(0.00001, 2200, 1.2, 0.0000178, 0.1)

Expected output:

Result
0.0239

Example 3: Particle starting at rest

Inputs:

D rhop rho mu V_zero
1e-7 2200 1.2 0.0000178 0

Excel formula:

=TIME_V_TERMINAL(1e-7, 2200, 1.2, 0.0000178, 0)

Expected output:

Result
0

Example 4: Particle in water

Inputs:

D rhop rho mu V_zero
0.000001 2600 1000 0.001 0.01

Excel formula:

=TIME_V_TERMINAL(0.000001, 2600, 1000, 0.001, 0.01)

Expected output:

Result
0

Python Code

import micropip
await micropip.install(["fluids"])
from fluids.drag import time_v_terminal_Stokes as fluids_time_v_terminal_Stokes

def time_v_terminal(D, rhop, rho, mu, V_zero):
    """
    Calculate time for a particle in Stokes regime to reach terminal velocity.

    See: https://fluids.readthedocs.io/fluids.drag.html#fluids.drag.time_v_terminal_Stokes

    This example function is provided as-is without any representation of accuracy.

    Args:
        D (float): Diameter of the sphere [m]
        rhop (float): Particle density [kg/m^3]
        rho (float): Density of the surrounding fluid [kg/m^3]
        mu (float): Viscosity of the surrounding fluid [Pa*s]
        V_zero (float): Initial velocity of the particle [m/s]

    Returns:
        float: Time for particle to reach terminal velocity [s], or error message (str) if invalid.
    """
    # Validate inputs
    try:
        D = float(D)
        rhop = float(rhop)
        rho = float(rho)
        mu = float(mu)
        V_zero = float(V_zero)
    except (ValueError, TypeError):
        return "Error: All parameters must be numbers."

    if D <= 0:
        return "Error: Diameter must be positive."
    if rhop <= 0:
        return "Error: Particle density must be positive."
    if rho <= 0:
        return "Error: Fluid density must be positive."
    if mu <= 0:
        return "Error: Viscosity must be positive."

    try:
        result = fluids_time_v_terminal_Stokes(D=D, rhop=rhop, rho=rho, mu=mu, V0=V_zero)
        if result != result:  # NaN check
            return "Calculation resulted in NaN."
        return float(result)
    except Exception as e:
        return f"Error: {str(e)}"

Online Calculator